/*
 * Created by JFormDesigner on Wed Jul 27 16:26:21 EDT 2011
 */

package ca.etsmtl.log730.projet2.view;

import java.awt.*;
import javax.swing.*;

/**
 * @author Gilbert Deir
 */
public class EditeurGUI extends JFrame {
	public EditeurGUI() {
		initComponents();
	}

	private void initComponents() {
		// JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
		// Generated using JFormDesigner Evaluation license - Gilbert Deir
		label1 = new JLabel();
		scrollPane1 = new JScrollPane();
		txtOpenedDocument = new JTextArea();
		label2 = new JLabel();
		label3 = new JLabel();
		txtIpAdresse = new JTextField();
		txtPort = new JTextField();
		BtnConnect = new JButton();
		BtnDisconnect = new JButton();
		BtnRead = new JButton();
		BtnLockAndWrite = new JButton();
		BtnLockAndDelete = new JButton();
		label4 = new JLabel();
		txtNomNouveauFichier = new JTextField();
		BtnCreerFichier = new JButton();
		BtnUnlock = new JButton();
		separator1 = new JSeparator();
		separator2 = new JSeparator();
		separator3 = new JSeparator();
		separator4 = new JSeparator();
		label5 = new JLabel();
		textField3 = new JTextField();
		label6 = new JLabel();
		cmbFichierDisponible = new JComboBox();
		scrollPane2 = new JScrollPane();
		lstMessage = new JList();
		btnCloseDocument = new JButton();

		//======== this ========
		setTitle("Editeur de text");
		Container contentPane = getContentPane();
		contentPane.setLayout(null);

		//---- label1 ----
		label1.setText("Fichier disponible dans le syst\u00e8me:");
		contentPane.add(label1);
		label1.setBounds(10, 55, 175, label1.getPreferredSize().height);

		//======== scrollPane1 ========
		{
			scrollPane1.setViewportView(txtOpenedDocument);
		}
		contentPane.add(scrollPane1);
		scrollPane1.setBounds(10, 250, 755, 215);

		//---- label2 ----
		label2.setText("Adresse IP:");
		contentPane.add(label2);
		label2.setBounds(10, 10, 65, 14);

		//---- label3 ----
		label3.setText("Port:");
		contentPane.add(label3);
		label3.setBounds(new Rectangle(new Point(185, 10), label3.getPreferredSize()));
		contentPane.add(txtIpAdresse);
		txtIpAdresse.setBounds(75, 5, 105, txtIpAdresse.getPreferredSize().height);
		contentPane.add(txtPort);
		txtPort.setBounds(215, 5, 55, txtPort.getPreferredSize().height);

		//---- BtnConnect ----
		BtnConnect.setText("Connect");
		contentPane.add(BtnConnect);
		BtnConnect.setBounds(290, 5, 75, BtnConnect.getPreferredSize().height);

		//---- BtnDisconnect ----
		BtnDisconnect.setText("Disconnect");
		contentPane.add(BtnDisconnect);
		BtnDisconnect.setBounds(new Rectangle(new Point(370, 5), BtnDisconnect.getPreferredSize()));

		//---- BtnRead ----
		BtnRead.setText("Read");
		contentPane.add(BtnRead);
		BtnRead.setBounds(new Rectangle(new Point(365, 50), BtnRead.getPreferredSize()));

		//---- BtnLockAndWrite ----
		BtnLockAndWrite.setText("Lock & Write");
		contentPane.add(BtnLockAndWrite);
		BtnLockAndWrite.setBounds(new Rectangle(new Point(430, 50), BtnLockAndWrite.getPreferredSize()));

		//---- BtnLockAndDelete ----
		BtnLockAndDelete.setText("Lock & Delete");
		contentPane.add(BtnLockAndDelete);
		BtnLockAndDelete.setBounds(620, 50, 105, BtnLockAndDelete.getPreferredSize().height);

		//---- label4 ----
		label4.setText("Nom du fichier pour cr\u00e9ation:");
		contentPane.add(label4);
		label4.setBounds(new Rectangle(new Point(10, 100), label4.getPreferredSize()));
		contentPane.add(txtNomNouveauFichier);
		txtNomNouveauFichier.setBounds(160, 95, 165, txtNomNouveauFichier.getPreferredSize().height);

		//---- BtnCreerFichier ----
		BtnCreerFichier.setText("Cr\u00e9er fichier");
		contentPane.add(BtnCreerFichier);
		BtnCreerFichier.setBounds(new Rectangle(new Point(345, 95), BtnCreerFichier.getPreferredSize()));

		//---- BtnUnlock ----
		BtnUnlock.setText("Unlock");
		BtnUnlock.setEnabled(false);
		contentPane.add(BtnUnlock);
		BtnUnlock.setBounds(530, 50, 80, BtnUnlock.getPreferredSize().height);
		contentPane.add(separator1);
		separator1.setBounds(10, 35, 730, 2);
		contentPane.add(separator2);
		separator2.setBounds(10, 80, 730, separator2.getPreferredSize().height);
		contentPane.add(separator3);
		separator3.setBounds(10, 125, 730, separator3.getPreferredSize().height);
		contentPane.add(separator4);
		separator4.setBounds(10, 220, 730, separator4.getPreferredSize().height);

		//---- label5 ----
		label5.setText("Fichier:");
		contentPane.add(label5);
		label5.setBounds(10, 230, 40, label5.getPreferredSize().height);

		//---- textField3 ----
		textField3.setEnabled(false);
		contentPane.add(textField3);
		textField3.setBounds(50, 225, 230, textField3.getPreferredSize().height);

		//---- label6 ----
		label6.setText("Message:");
		contentPane.add(label6);
		label6.setBounds(10, 130, 60, label6.getPreferredSize().height);
		contentPane.add(cmbFichierDisponible);
		cmbFichierDisponible.setBounds(180, 50, 170, cmbFichierDisponible.getPreferredSize().height);

		//======== scrollPane2 ========
		{
			scrollPane2.setViewportView(lstMessage);
		}
		contentPane.add(scrollPane2);
		scrollPane2.setBounds(10, 150, 755, 60);

		//---- btnCloseDocument ----
		btnCloseDocument.setText("Close Document");
		contentPane.add(btnCloseDocument);
		btnCloseDocument.setBounds(650, 480, 115, btnCloseDocument.getPreferredSize().height);

		{ // compute preferred size
			Dimension preferredSize = new Dimension();
			for(int i = 0; i < contentPane.getComponentCount(); i++) {
				Rectangle bounds = contentPane.getComponent(i).getBounds();
				preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
				preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
			}
			Insets insets = contentPane.getInsets();
			preferredSize.width += insets.right;
			preferredSize.height += insets.bottom;
			contentPane.setMinimumSize(preferredSize);
			contentPane.setPreferredSize(preferredSize);
		}
		pack();
		setLocationRelativeTo(getOwner());
		// JFormDesigner - End of component initialization  //GEN-END:initComponents
	}

	// JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables
	// Generated using JFormDesigner Evaluation license - Gilbert Deir
	private JLabel label1;
	private JScrollPane scrollPane1;
	private JTextArea txtOpenedDocument;
	private JLabel label2;
	private JLabel label3;
	private JTextField txtIpAdresse;
	private JTextField txtPort;
	private JButton BtnConnect;
	private JButton BtnDisconnect;
	private JButton BtnRead;
	private JButton BtnLockAndWrite;
	private JButton BtnLockAndDelete;
	private JLabel label4;
	private JTextField txtNomNouveauFichier;
	private JButton BtnCreerFichier;
	private JButton BtnUnlock;
	private JSeparator separator1;
	private JSeparator separator2;
	private JSeparator separator3;
	private JSeparator separator4;
	private JLabel label5;
	private JTextField textField3;
	private JLabel label6;
	private JComboBox cmbFichierDisponible;
	private JScrollPane scrollPane2;
	private JList lstMessage;
	private JButton btnCloseDocument;
	// JFormDesigner - End of variables declaration  //GEN-END:variables
}
